const jwt = require('jsonwebtoken')
const privateKey = process.env.privateKey

module.exports = {
	sign(data) {
		return jwt.sign(data, privateKey, { expiresIn: '7d' })
	},
	verify(token) {
		return jwt.verify(token, privateKey)
	}
}